<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ECharts</title>
    <!--引入echarts.js-->
    <script src="/js/plugins/echarts/echarts.common.min.js"></script>
</head>
<body>
<!--准备dom-->
<div id="main" style="width: 600px;height: 400px;"></div>
<script type="text/javascript">
    var myChart = echars.init(document.getElementById('main'));
    var option = {
        title: {
            text: '潜在客户报表',
            subtext: "分组类型:${groupTypeName}"
        },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['潜在客户数']
        },
        toolbox: {
            show: true,
            feature: {
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        calculable: true,
        xAxis: [
            {
                type: 'category',
                data: ${xList}
                /*['孙总','钱二明',"赵一明","王五"]*/
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '潜在客户数',
                type: 'bar',
                data: ${yList},  //[8,15,30,3]
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                markLine: {
                    data: [
                        {type: 'average', name: '平均值'}
                    ]
                }
            }
        ]
    };
    myChart.setOption(option);
</script>
</body>
</html>